home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / netbsd / incoming / xc-readme.netbsd-cross < prev   
Text File  |  1996-01-08  |  3KB  |  76 lines

  1. This README is for the netbsdcross.tar.gz file.  The netbsdcross.tar.gz is a 
  2. tar'ed and compressed archive that contains everything you would need to 
  3. user a Sun SparcStation running Solaris2.4 as a cross compiler for
  4. m68k-mac-netbsd1.1a (its really 1.1 but gnu thinks its 1.1a.)
  5.  
  6. Instructions for installing:
  7.    cd $installdir
  8.    gzcat $path_to_archive/netbsdcross.tar.gz |tar -xf -
  9.    cd bin
  10.    ln ../lib/gcc-lib/m68k-mac-netbsd1.1a/2.7.2/cc1 cc1
  11.    ln ../lib/gcc-lib/m68k-mac-netbsd1.1a/2.7.2/cc1plus cc1plus
  12.    ln ../lib/gcc-lib/m68k-mac-netbsd1.1a/2.7.2/cpp cpp
  13. ( the last 3 are because I forgot to do that before creating the tar file )
  14. This puts all files in a subdirectory NetBSD in the directory you installed in.
  15.  
  16. NOTE:  This archive does NOT contain export controlled libraries and can be
  17. transfered overseas.  If you want to use the export control libraries with the
  18. cross-compiler you must obtain the security package on your own, through
  19. proper channels and do the following:
  20.    gzcat secr11 |tar -xf - ./usr/lib        (Do NOT do this in / )
  21.    mv usr/lib/lib* $installdir/NetBSD/lib
  22.  
  23.  
  24. Instructions for using:
  25.  
  26.    This part is a little tricky and is not for the faint of heart or people 
  27. with little experience porting software.  For starters you need to put
  28. $installdir/m68k-mac-netbsd1.1a/bin first in your path.  This dir contains
  29. the cross compiler, assembler, et. al and needs to be first so the appropriate
  30. tools are located.  Second when compiling you need the following:
  31.  
  32. CFLAGS = -nostdinc -I$installdir/NetBSD/include
  33. LDFLAGS = -nostdlib -L$installdir/NetBSD/lib
  34. EXTRALIB = $installdir/lib/crt0.o -lc -lgcc
  35.  
  36. since you use the -nostdlib flag to ld it will not automatically use libc and 
  37. libgcc so you must specify them explicitly.  
  38.  
  39. NOTE: These are just the flags etc you need in addition to the usual compile 
  40. flags and may not work if specified alone.  Also check your make file for exact
  41. variables (CFLAGS, LDFLAGS, EXTRALIB) that the options should go in.  I 
  42. mentioned this is not for the faint of heart already right? :)
  43.  
  44. I have used this package to cross compile ssh and friends on my SS20 and they
  45. ran quite nicely on my Performa 600/NetBSD 1.1 box.  Kernel makes etc will
  46. be happening after I get config ported.
  47.  
  48. Technical Notes:
  49.  
  50. gcc2.7.2 was configured as follows for this cross compiler:
  51. (Contents of config.status)
  52.  
  53. #!/bin/sh
  54. # GCC was configured as follows:
  55. ../gcc-2.7.2/configure --target=m68k-mac-netbsd1.1a --host=sparc-sun-solaris2.4 --with-gnu-as --with-gnu-ld --srcdir=../gcc-2.7.2 --prefix=/home/apalmer/NetBSD --local-prefix=/home/apalmer/NetBSD/crossinclude --with-gcc
  56. echo host=sparc-sun-solaris2.4 target=m68k-mac-netbsd1.1a build=sparc-sun-solaris2.4
  57.  
  58. binutils-2.6 was configured as follows:
  59. (Contents of config.status)
  60.  
  61. #!/bin/sh
  62. # This file was generated automatically by configure.  Do not edit.
  63. # This directory was configured as follows:
  64. ../binutils-2.6/configure --target=m68k-mac-netbsd1.1a --host=sparc-sun-solaris2.4 --with-gnu-as --with-gnu-ld --prefix=/home/apalmer/NetBSD --with-gcc --norecursion
  65. # using "config/mh-solaris"
  66.  
  67. Any questions/comments to 
  68. hawks@mcs.com
  69.  
  70. I may be able to help a little with problems due use of the cross compiler but
  71. dont bet your life on it.
  72.  
  73. Alan Palmer
  74. hawks@mcs.com
  75. 1/8/96
  76.